import "./App.css";
import { HashRouter, Switch, Route } from "react-router-dom";
import routes from "./Router";
import store from "./store/index";
import { Provider } from "react-redux";

function App() {
  return (
    <Provider store={store}>
      <HashRouter>
        <>
          <Switch>
            {routes.map((route) => (
              <Route
                key={route.path}
                path={route.path}
                component={route.component}
              />
            ))}
          </Switch>
        </>
      </HashRouter>
    </Provider>
  );
}

export default App;
